package com.wwz.leetcode;

import org.junit.Test;

public class LeetCode9 {

    public boolean isPalindrome(int x) {
        if (x < 0 ) {
            return false;
        }
        int n = 0;
        int num = x;
        while (num > 0) {
            n = n * 10 + num % 10;
            num = num / 10;
        }
        return n==x ? true : false;
    }

    @Test
    public void test() {
        //System.out.println(myAtoi("words and 987"));
        System.out.println(isPalindrome(0));
    }
}
